package com.cz.datafetcher.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel(value = "推送数据模型")
public class PostEntity {
    @ApiModelProperty("设备id")
    Integer deviceId;
    @ApiModelProperty("值")
    BigDecimal value;
    @ApiModelProperty("值对应的开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    Date begin;
    @ApiModelProperty("值对应的结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    Date end;
    @ApiModelProperty("发送方")
    String poster;
    @ApiModelProperty("是否累计值，累计值传true，增量传false")
    boolean sumvalue;
}
